#ifndef _QNODE_
#define _QNODE_

#include "GameObject.h"
#include "CRect.h"
#include <list>
using namespace std;

class QNode
{
public:
	QNode *_tl, *_tr, *_bl, *_br;
	int _nodeID;

	list<GameObject*> _listObjects;
	CRect _bound;
public:
	QNode();
	QNode(int id, CRect bound);
	~QNode();
	void insertObjects(list<GameObject*> listObjets);
	void insertObject(GameObject* gameObject);

	int getParentID();
	int getID();
	QNode* getChild(int n);
	void setChild(int n, QNode* p);
	list<GameObject*> getListGameObjects();
	CRect getBound();
	void Insert(GameObject *);

	list<GameObject*> GetAllObjects();
	void ClearObjects();
	void Update();
};

#endif